﻿@model FCNS.ERP.Models.ErpCategoryCorS

@{
    ViewBag.Title = "客商分类-新增";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal"> 
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            @Html.LabelFor(model => model.Enable, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <div class="checkbox">
                    @Html.CheckBoxFor(model => model.Enable, htmlAttributes: new { @checked = "checked" } )
                    @Html.ValidationMessageFor(model => model.Enable, "", new { @class = "text-danger",@value="true"})
                </div>
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ParentCategoryId, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("ParentCategoryId", ViewData["CategoryCorS"] as SelectList, htmlAttributes: new { @class = "form-control" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
            </div>
        </div>
          
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="新增" class="btn btn-default" />
            </div>
        </div>
    </div>
}

    <div> 
        <a class="backToListImg" href="/Category/CategoryCorS">返回</a>
    </div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
